<template>
  <div class="treeTools-container">
    <!-- ===={{ toolNode }} -->
    <el-row style="row-title">
      <!-- 左边 -->
      <el-col :span="20"
        >{{ toolNode.name }}
        <div class="grid-content bg-purple"></div
      ></el-col>
      <!-- 右边 -->
      <el-col :span="4">
        <el-row style="row-title">
          <el-col :span="12"
            >{{toolNode.manager}}
            <div class="grid-content bg-purple"></div
          ></el-col>
          <el-col :span="12">
            <el-dropdown>
              <span>
                操作<i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item disabled>添加子部门</el-dropdown-item>
                <el-dropdown-item v-if="isRoot">编辑部门 </el-dropdown-item>
                <el-dropdown-item v-if="isRoot">删除部门</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </el-col>
        </el-row>
        <div class="grid-content bg-purple-light"></div
      ></el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "",
  //接受值
  props: {
    isRoot: {
      type: Boolean,
      default: true
    },
    toolNode: {
      type: [Object, Array]
    }
  }
};
</script>
<style lang="scss" scoped>
.treeTools-container {
  width: 100%;
  .el-row {
    .el-col {
      height: 20px;
    }
  }
}
</style>